import React, { Component } from 'react'
import BScroll from 'better-scroll'
import bsStyle from './bs.module.scss'

export default class Bs extends Component {
  constructor(props) {
    super(props)
    this.myRef = React.createRef()
  }
  componentDidMount() {
    new BScroll(this.myRef.current, {})
  }
  render() {
    return (
      <div className={bsStyle['bs-container']}>
        <div ref={this.myRef} className={bsStyle['bs-main']}>
          <div className={bsStyle['bs-main-content']}>
            <h1 className="" style={{ height: 300, marginTop: 5, background: '#ccc' }}>
              内容
            </h1>
            <h1 className="" style={{ height: 300, marginTop: 5, background: '#ccc' }}>
              内容
            </h1>{' '}
            <h1 className="" style={{ height: 300, marginTop: 5, background: '#ccc' }}>
              内容
            </h1>{' '}
            <h1 className="" style={{ height: 300, marginTop: 5, background: '#ccc' }}>
              内容
            </h1>{' '}
            <h1 className="" style={{ height: 300, marginTop: 5, background: '#ccc' }}>
              内容
            </h1>{' '}
            <h1 className="" style={{ height: 300, marginTop: 5, background: '#ccc' }}>
              内容
            </h1>{' '}
            <h1 className="" style={{ height: 300, marginTop: 5, background: '#ccc' }}>
              内容
            </h1>
          </div>
        </div>
        <div className={bsStyle['bs-footer']}>footer</div>
      </div>
    )
  }
}
